def times(fn):
    def newFun():
        start = time.time()
        fn()
        end = time.time()
        print("last for []/s".format((end-start)/1000)
              
@times
def compute(n):
    sum = 0
    for i in range(0,n):
        sum +=i**2
    return sum
              
compute(10)    
            
